home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / tcl / tclm_1_0.lha / tclm-1.0 / Makefile < prev    next >
Makefile  |  1993-08-16  |  3KB  |  139 lines

  1. #
  2. # set TCLSRCDIR to the location of the tcl source
  3. #
  4. TCLSRCDIR = /usr/local/src/tk3.2/tcl
  5.  
  6. #
  7. # add -DMIDIPLAY to defines if you wish to compile in the ability to
  8. # play standard MIDI files.  This will only work on systems
  9. # equipped with a MIDI interface and systems with an interface
  10. # between tclm and the MIDI device.  See the DRIVER define
  11. # for a list of currently available interfaces.
  12. #
  13. # add -DUNION_WAIT if your wait3(2) system call needs a
  14. # union wait and not an int.
  15. #
  16. # DEFS = -DUNION_WAIT
  17. DEFS = -DMIDIPLAY
  18.  
  19. #
  20. # add driver type.  This only matters if PLAYMIDI is defined
  21. # current choices are:
  22. #   mpu_bsd386.o        MPU-401 compatibles on BSD/386
  23. #
  24. # DRIVER =
  25. DRIVER = mpu_bsd386.o
  26.  
  27. #
  28. # set RANLIB to ranlib if your system has it - otherwise set it to
  29. # true
  30. #
  31. # RANLIB = true
  32. RANLIB = ranlib
  33.  
  34. #
  35. # set INSTALL to be your install program
  36. #
  37. # INSTALL = cp
  38. INSTALL = install
  39.  
  40. #
  41. # set INSTALLEXECFLAG to be flags needed when installing
  42. # executables
  43. #
  44. INSTALLEXECFLAG = -c -m 755
  45.  
  46. #
  47. # set INSTALLTEXTFLAG to be flags needed when installing
  48. # text files
  49. #
  50. INSTALLTEXTFLAG = -c -m 644
  51.  
  52. #
  53. # set BINDIR to the directory where the executables should go
  54. #
  55. BINDIR = /usr/local/bin
  56.  
  57. #
  58. # set LIBDIR to the directory where libtclm.a and libmutil.a should go
  59. #
  60. LIBDIR = /usr/local/lib
  61.  
  62. #
  63. # set INCDIR to the directory where the .h files should go
  64. #
  65. INCDIR = /usr/local/include
  66.  
  67. #
  68. # tclm library stuff
  69. #
  70. TCLMLIB = libtclm.a
  71. TCLMLIBOBJS = tclmCmd.o tclmPlay.o
  72.  
  73. #
  74. # stuff for a tclm executable
  75. #
  76. TCLMSRC = main.c
  77. TCLMOBJ = main.o
  78. TCLMEXEC = tclm
  79.  
  80. #
  81. # some sample scripts
  82. #
  83. TCLMSCRIPTS = mplay minfo mseq m1to0 infom mrecord
  84.  
  85. #
  86. # where the MIDI library routines are located
  87. #
  88. MIDILIBDIR = ./mlib
  89. MIDILIB = $(MIDILIBDIR)/libmutil.a
  90.  
  91. #
  92. # flags and libraries
  93. # using the -lm flag in case someone has tclx which wants pow(3)
  94. #
  95. LIBS = -ltcl -ltclm -lmutil -lm
  96. LDFLAGS = -L. -L$(MIDILIBDIR) -L$(LIBDIR) $(LIBS)
  97. CFLAGS = $(DEFS) -O -I$(TCLSRCDIR) -I$(MIDILIBDIR)
  98. CC = cc
  99.  
  100.  
  101. $(TCLMEXEC): $(MIDILIB) $(TCLMLIB) $(TCLMOBJ)
  102.     $(CC) -o $(TCLMEXEC) $(TCLMOBJ) $(LDFLAGS)
  103.  
  104. $(TCLMLIB): $(TCLMLIBOBJS)
  105.     rm -f $(TCLMLIB)
  106.     ar cr $(TCLMLIB) $(TCLMLIBOBJS)
  107.     $(RANLIB) $(TCLMLIB)
  108.  
  109. $(MIDILIB): FORCE
  110.     cd $(MIDILIBDIR); \
  111.     $(MAKE) DEFS=$(DEFS) RANLIB=$(RANLIB) DRIVER=$(DRIVER)
  112.  
  113. install: $(TCLMEXEC) $(TCLMSCRIPTS)
  114.     $(INSTALL) $(INSTALLEXECFLAG) $(TCLMEXEC) $(TCLMSCRIPTS) $(BINDIR)
  115.     $(INSTALL) $(INSTALLTEXTFLAG) $(TCLMLIB) $(LIBDIR)
  116.     $(RANLIB) $(LIBDIR)/$(TCLMLIB)
  117.     $(INSTALL) $(INSTALLTEXTFLAG) tclm.h tclmPlay.h $(INCDIR)
  118.     cd $(MIDILIBDIR); \
  119.     $(MAKE) install \
  120.         LIBDIR="$(LIBDIR)" \
  121.         RANLIB="$(RANLIB)" \
  122.         INCDIR="$(INCDIR)" \
  123.         INSTALL="$(INSTALL)" \
  124.         INSTALLEXECFLAG="$(INSTALLEXECFLAG)" \
  125.         INSTALLTEXTFLAG="$(INSTALLTEXTFLAG)"
  126.  
  127. install-man-cooked:
  128.     cd doc; $(MAKE) install-man-cooked
  129.  
  130. install-man-raw:
  131.     cd doc; $(MAKE) install-man-raw
  132.  
  133. clean:
  134.     rm -f $(TCLMEXEC) $(TCLMLIB) $(TCLMLIBOBJS) $(TCLMOBJ)
  135.     cd $(MIDILIBDIR); $(MAKE) clean
  136.     cd doc; $(MAKE) clean
  137.  
  138. FORCE:
  139.